home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / ct_ocx / ct_split.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-31  |  4.5 KB  |  139 lines

  1. VERSION 4.00
  2. Begin VB.Form w_split_demo 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "ctSplit (Splitter Bar) Demo"
  5.    ClientHeight    =   4710
  6.    ClientLeft      =   2040
  7.    ClientTop       =   2580
  8.    ClientWidth     =   7155
  9.    Height          =   5115
  10.    Icon            =   "ct_split.frx":0000
  11.    Left            =   1980
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4710
  17.    ScaleWidth      =   7155
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   2235
  20.    Width           =   7275
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "E&xit"
  23.       Height          =   495
  24.       Left            =   5880
  25.       TabIndex        =   2
  26.       Top             =   4020
  27.       Width           =   1095
  28.    End
  29.    Begin SplitLib.ctSplit ctSplit1 
  30.       Height          =   3435
  31.       Left            =   240
  32.       TabIndex        =   0
  33.       Top             =   1140
  34.       Width           =   5235
  35.       _version        =   65536
  36.       _extentx        =   9234
  37.       _extenty        =   6059
  38.       _stockprops     =   64
  39.       barthickness    =   8
  40.       margin          =   40
  41.       bordertype      =   3
  42.       w1_bottom       =   229
  43.       w1_right        =   170
  44.       w2_left         =   178
  45.       w2_bottom       =   229
  46.       w2_right        =   349
  47.       barthreed       =   -1  'True
  48.       Begin VB.CommandButton Btn_3 
  49.          Caption         =   "#3"
  50.          Height          =   555
  51.          Left            =   2940
  52.          TabIndex        =   5
  53.          Top             =   2400
  54.          Width           =   1995
  55.       End
  56.       Begin VB.CommandButton Btn_2 
  57.          Caption         =   "#2"
  58.          Height          =   555
  59.          Left            =   2880
  60.          TabIndex        =   4
  61.          Top             =   1380
  62.          Width           =   2055
  63.       End
  64.       Begin VB.CommandButton Btn_1 
  65.          Caption         =   "#1"
  66.          Height          =   555
  67.          Left            =   2880
  68.          TabIndex        =   3
  69.          Top             =   360
  70.          Width           =   1995
  71.       End
  72.       Begin VB.Frame Frame1 
  73.          Appearance      =   0  'Flat
  74.          BackColor       =   &H00FFFFFF&
  75.          Caption         =   "Frame Box"
  76.          ForeColor       =   &H80000008&
  77.          Height          =   2955
  78.          Left            =   240
  79.          TabIndex        =   1
  80.          Top             =   300
  81.          Width           =   2115
  82.       End
  83.    End
  84.    Begin VB.Label Label2 
  85.       Caption         =   "Click on the splitter bar and drag it to side or the other."
  86.       Height          =   975
  87.       Left            =   5700
  88.       TabIndex        =   7
  89.       Top             =   1320
  90.       Width           =   1275
  91.    End
  92.    Begin VB.Label Label1 
  93.       Alignment       =   2  'Center
  94.       Caption         =   $"ct_split.frx":030A
  95.       BeginProperty Font 
  96.          name            =   "MS Sans Serif"
  97.          charset         =   0
  98.          weight          =   700
  99.          size            =   8.25
  100.          underline       =   0   'False
  101.          italic          =   0   'False
  102.          strikethrough   =   0   'False
  103.       EndProperty
  104.       ForeColor       =   &H00800000&
  105.       Height          =   915
  106.       Left            =   300
  107.       TabIndex        =   6
  108.       Top             =   120
  109.       Width           =   6735
  110.    End
  111. Attribute VB_Name = "w_split_demo"
  112. Attribute VB_Creatable = False
  113. Attribute VB_Exposed = False
  114. Private Sub Command1_Click()
  115.    Unload w_split_demo
  116. End Sub
  117. Private Sub ctSplit1_BarMove(W1_Top As Integer, W1_Left As Integer, W1_Bottom As Integer, W1_Right As Integer, W2_Top As Integer, W2_Left As Integer, W2_Bottom As Integer, W2_Right As Integer)
  118.    Dim nSize As Integer
  119.    Frame1.Left = 150
  120.    Frame1.Width = (W1_Right * 15) - 300
  121.    nSize = ((W1_Bottom - W1_Top) * 15) / 7
  122.    Btn_1.Left = (W2_Left * 15) + 135
  123.    Btn_1.Width = ((W2_Right - W2_Left) * 15) - 270
  124.    Btn_1.Top = nSize * 1
  125.    Btn_1.Height = nSize
  126.    Btn_2.Left = (W2_Left * 15) + 135
  127.    Btn_2.Width = ((W2_Right - W2_Left) * 15) - 270
  128.    Btn_2.Top = nSize * 3
  129.    Btn_2.Height = nSize
  130.    Btn_3.Left = (W2_Left * 15) + 135
  131.    Btn_3.Width = ((W2_Right - W2_Left) * 15) - 270
  132.    Btn_3.Top = nSize * 5
  133.    Btn_3.Height = nSize
  134. End Sub
  135. Private Sub Form_Load()
  136.    ' Center the window on the screen
  137.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.15
  138. End Sub
  139.